<?php
$link = mysql_connect("localhost","root");
mysql_select_db("mydb",$link);

$query = "select res from resid";
$result = mysql_query($query);
print "<SELECT name=item>";
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "<OPTION value='$value'";
}
print ">$value</OPTION>";
}
mysql_close($link);
print "</SELECT>";
?>
